﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace SqlSugarCoreDemo.DBSqlSugar
{
    /// <summary>
    /// 管理员日志表
    /// </summary>
    [SugarTable("SysManagerLog", TableDescription = "管理员日志表")]
    public partial class SysManagerLog
    {
        /// <summary>
        /// 日志ID
        /// </summary>
        [Display(Name = "日志ID")]
        [SugarColumn(ColumnDescription = "日志ID", IsPrimaryKey = true, IsIdentity = true)]
        public int id { get; set; }
        /// <summary>
        /// 访问应用ID
        /// </summary>
        [Display(Name = "访问应用ID")]
        [SugarColumn(ColumnDescription = "访问应用ID")]
        public int appsId { get; set; }
        /// <summary>
        /// 管理员ID
        /// </summary>
        [Display(Name = "管理员ID")]
        [SugarColumn(ColumnDescription = "管理员ID")]
        public int managerId { get; set; }
        /// <summary>
        /// 管理员用户名
        /// </summary>
        [Display(Name = "管理员用户名")]
        [SugarColumn(ColumnDescription = "管理员用户名")]
        [StringLength(25, ErrorMessage = "【{0}】不能超过{1}长度")]
        public string userName { get; set; }
        /// <summary>
        /// 操作类型：1 登陆，2 修改密码，3 功能管理
        /// </summary>
        [Display(Name = "操作类型")]
        [SugarColumn(ColumnDescription = "操作类型")]
        public byte actionType { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [Display(Name = "备注")]
        [SugarColumn(ColumnDescription = "备注", IsNullable = true)]
        public string remark { get; set; }
        /// <summary>
        /// 操作ip
        /// </summary>
        [Display(Name = "操作ip")]
        [SugarColumn(ColumnDescription = "操作ip", IsNullable = true)]
        public string ip { get; set; }
        /// <summary>
        /// 操作ip地址
        /// </summary>
        [Display(Name = "操作ip地址")]
        [SugarColumn(ColumnDescription = "操作ip地址", IsNullable = true)]
        public string ipAddr { get; set; }
        /// <summary>
        /// 操作网址（保存时进行html化）
        /// </summary>
        [Display(Name = "操作网址")]
        [SugarColumn(ColumnDescription = "操作网址", IsNullable = true)]
        public string pageUrl { get; set; }
        /// <summary>
        /// 操作网址表单（保存时进行html化）
        /// </summary>
        [Display(Name = "操作网址表单")]
        [SugarColumn(ColumnDescription = "操作网址表单", IsNullable = true)]
        public string pageData { get; set; }
        /// <summary>
        /// 操作状态 1 成功  2失败  3警告
        /// </summary>
        [Display(Name = "操作状态")]
        [SugarColumn(ColumnDescription = "操作状态")]
        public byte state { get; set; }
        /// <summary>
        /// 添加时间
        /// </summary>
        [Display(Name = "添加时间")]
        [SugarColumn(ColumnDescription = "添加时间")]
        public DateTime? addTime { get; set; }
        /// <summary>
        /// 客户端信息，JSON格式：{ os:操作系统, browser:浏览器类型 }
        /// </summary>
        [Display(Name = "客户端JSON信息")]
        [SugarColumn(ColumnDescription = "客户端JSON信息", IsNullable = true)]
        public string clientInfo { get; set; }
        /// <summary>
        /// 调用堆栈
        /// </summary>
        [Display(Name = "调用堆栈")]
        [SugarColumn(ColumnDescription = "调用堆栈", IsNullable = true)]
        public string callStack { get; set; }
    }
}
